var bgImgLoadedCount = 0;

function bgImgLoaded () {
  bgImgLoadedCount++;
  this.checkBgImgLoadedCount(bgImgLoadedCount);
}

function checkBgImgLoadedCount (currentCount) {
  // if (currentCount === 8) {
  //   document.getElementById('mask-div').style.display = 'none';
  // } else {
  //   document.getElementById('mask-div').style.display = 'block';
  // }
  if (currentCount === 1) {
    document.getElementById('mask-div').style.display = 'none';
  } else {
    document.getElementById('mask-div').style.display = 'block';
  }
}